import cv2

def rouge(image, face_landmark, ruby=True):
    """
    自动涂口红
    image： 人像图片
    face_landmark: 人脸关键点
    ruby：是否需要深色口红
    """
    image_cp = image.copy()

    if ruby:
        rouge_color = (0, 0, 255)
    else:
        rouge_color = (0, 0, 200)

    points = face_landmark[48:68]

    hull = cv2.convexHull(points)
    cv2.drawContours(image, [hull], -1, rouge_color, -1)
    cv2.addWeighted(image, 0.2, image_cp, 0.9, 0, image_cp)
    return image_cp